package com.lswms.controller.admin;

import com.alibaba.fastjson.JSON;
import com.lswms.annotation.Login;
import com.lswms.common.page.PageInfo;
import com.lswms.common.utils.Result;
import com.lswms.common.validator.ValidatorUtils;
import com.lswms.dto.YnSignRecordDTO;
import com.lswms.dto.vo.req.SignRecordListReq;
import com.lswms.dto.vo.resp.LotteryListResp;
import com.lswms.service.YnSignRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 */
@RestController
@RequestMapping("/api/admin/ynsign")
@Api(tags="报名记录-admin")
@Slf4j
public class AdminYnSignController {

	@Autowired
	private YnSignRecordService ynSignRecordService;

    /**
     * 报名记录
     * @param req
     * @return
     */
    @GetMapping("listByCondition")
    @ApiOperation("条件查询报名记录")
    public Result<PageInfo<YnSignRecordDTO>> listByCondition(SignRecordListReq req){
    	log.info("条件查询报名记录，参数：dto:{}",JSON.toJSONString(req));
    	ValidatorUtils.validateEntity(req);
    	PageInfo<YnSignRecordDTO> resp = ynSignRecordService.listByCondition(req);
        return new Result<PageInfo<YnSignRecordDTO>>().ok(resp);
    }

}